Skip to main content

Application Data

cartdata

cartdata(ID)

Declare a storage area (ID is the name), this area can store 1024 bytes of data (256 integers), if there is data, it will load the currently saved data, you must first call cartdata before using dget/dset, and only Call once.

ID is a character string with a maximum length of 64. The ID uniquely identifies the storage name, and special characters cannot be used.

cartdata("demo1")
dset(0, 0x11223344)

dget

dget(INDEX)

Get integer data from the position of INDEX, INDEX=0..255.

dset

dset(INDEX, VALUE [, FLUSH])

Save integer data to the position of INDEX, INDEX=0..255.

FLUSH: true means save data to disk.

dflush

save data to disk.

  • if not flush , the data will save to disk when reload cart or switch cart.